home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Audio
/
Patchmix
/
XWindowsSource
/
nutree.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-03-28
|
874b
|
41 lines
/* $Header: nutree.h,v 1.1 90/08/27 17:11:04 mara Exp $"
*
* nutree.h
*
* Written by Mara Helmuth
*
* Description: Tree class for Cmix X graphical interface
*
* $Log: nutree.h,v $
* Revision 1.1 90/08/27 17:11:04 mara
* Initial revision
*
*
*/
class t_node {
friend class tree;
private:
t_node *lastchild;
list nodelist; // list of input ugens
int contents; // ugen # this node represents
int index; // number in nodelist currently on
t_node() : nodelist(sizeof(t_node)) { index = 0; };
};
// tree stores indexes to ugen array
class tree {
private:
t_node* root;
int size;
getinputtype get_left, get_right;
public:
tree(int s, int out_ugen);
void insert(t_node* parent);
t_node* get_child(t_node* parent);
t_node* return_root() { return root; };
void clear(t_node* n = 0,int first = 1);
~tree() { clear(); };
};